package com.zzy.factory;
import com.zzy.card.AmExCC;
import com.zzy.card.creditCard;
import com.zzy.com.google.gson.Gson;
public class AmExFactory implements Factory{
	// 单例
    private static AmExFactory amExFactory = null;
    private AmExFactory() {
    }
    public static AmExFactory getFactory() {
        if (amExFactory == null) {
            amExFactory = new AmExFactory();
        }
        return amExFactory;
    }


	@Override
	public creditCard build(String line) {
		// TODO Auto-generated method stub
		Gson gson = new Gson();
        AmExCC shortdata = gson.fromJson(line, AmExCC.class);
        return shortdata;
	}

	@Override
	public creditCard build2() {
		// TODO Auto-generated method stub
		creditCard creditCard = new AmExCC();
        return creditCard;
	}

}
